Optimal. Leaf size=113 \[ \frac{2 b^3 \tanh ^{-1}\left (\frac{b-a \tanh \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a^2+b^2}}\right )}{a d \left (a^2+b^2\right )^{3/2}}-\frac{b \text{sech}(c+d x) (a \sinh (c+d x)+b)}{a d \left (a^2+b^2\right )}+\frac{\text{sech}(c+d x)}{a d}-\frac{\tanh ^{-1}(\cosh (c+d x))}{a d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.259943, antiderivative size = 113, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 9, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {2898, 2622, 321, 207, 2696, 12, 2660, 618, 204} \[ \frac{2 b^3 \tanh ^{-1}\left (\frac{b-a \tanh \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a^2+b^2}}\right )}{a d \left (a^2+b^2\right )^{3/2}}-\frac{b \text{sech}(c+d x) (a \sinh (c+d x)+b)}{a d \left (a^2+b^2\right )}+\frac{\text{sech}(c+d x)}{a d}-\frac{\tanh ^{-1}(\cosh (c+d x))}{a d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2898
Rule 2622
Rule 321
Rule 207
Rule 2696
Rule 12
Rule 2660
Rule 618
Rule 204
Rubi steps
\begin{align*} \int \frac{\text{csch}(c+d x) \text{sech}^2(c+d x)}{a+b \sinh (c+d x)} \, dx &=i \int \left (-\frac{i \text{csch}(c+d x) \text{sech}^2(c+d x)}{a}+\frac{i b \text{sech}^2(c+d x)}{a (a+b \sinh (c+d x))}\right ) \, dx\\ &=\frac{\int \text{csch}(c+d x) \text{sech}^2(c+d x) \, dx}{a}-\frac{b \int \frac{\text{sech}^2(c+d x)}{a+b \sinh (c+d x)} \, dx}{a}\\ &=-\frac{b \text{sech}(c+d x) (b+a \sinh (c+d x))}{a \left (a^2+b^2\right ) d}-\frac{b \int \frac{b^2}{a+b \sinh (c+d x)} \, dx}{a \left (a^2+b^2\right )}+\frac{\operatorname{Subst}\left (\int \frac{x^2}{-1+x^2} \, dx,x,\text{sech}(c+d x)\right )}{a d}\\ &=\frac{\text{sech}(c+d x)}{a d}-\frac{b \text{sech}(c+d x) (b+a \sinh (c+d x))}{a \left (a^2+b^2\right ) d}-\frac{b^3 \int \frac{1}{a+b \sinh (c+d x)} \, dx}{a \left (a^2+b^2\right )}+\frac{\operatorname{Subst}\left (\int \frac{1}{-1+x^2} \, dx,x,\text{sech}(c+d x)\right )}{a d}\\ &=-\frac{\tanh ^{-1}(\cosh (c+d x))}{a d}+\frac{\text{sech}(c+d x)}{a d}-\frac{b \text{sech}(c+d x) (b+a \sinh (c+d x))}{a \left (a^2+b^2\right ) d}+\frac{\left (2 i b^3\right ) \operatorname{Subst}\left (\int \frac{1}{a-2 i b x+a x^2} \, dx,x,\tan \left (\frac{1}{2} (i c+i d x)\right )\right )}{a \left (a^2+b^2\right ) d}\\ &=-\frac{\tanh ^{-1}(\cosh (c+d x))}{a d}+\frac{\text{sech}(c+d x)}{a d}-\frac{b \text{sech}(c+d x) (b+a \sinh (c+d x))}{a \left (a^2+b^2\right ) d}-\frac{\left (4 i b^3\right ) \operatorname{Subst}\left (\int \frac{1}{-4 \left (a^2+b^2\right )-x^2} \, dx,x,-2 i b+2 a \tan \left (\frac{1}{2} (i c+i d x)\right )\right )}{a \left (a^2+b^2\right ) d}\\ &=-\frac{\tanh ^{-1}(\cosh (c+d x))}{a d}+\frac{2 b^3 \tanh ^{-1}\left (\frac{b-a \tanh \left (\frac{1}{2} (c+d x)\right )}{\sqrt{a^2+b^2}}\right )}{a \left (a^2+b^2\right )^{3/2} d}+\frac{\text{sech}(c+d x)}{a d}-\frac{b \text{sech}(c+d x) (b+a \sinh (c+d x))}{a \left (a^2+b^2\right ) d}\\ \end{align*}
Mathematica [A] time = 0.264734, size = 171, normalized size = 1.51 \[ -\frac{-a b \sqrt{-a^2-b^2} \tanh (c+d x)+a^2 \sqrt{-a^2-b^2} \text{sech}(c+d x)+b^2 \sqrt{-a^2-b^2} \log \left (\tanh \left (\frac{1}{2} (c+d x)\right )\right )+a^2 \sqrt{-a^2-b^2} \log \left (\tanh \left (\frac{1}{2} (c+d x)\right )\right )-2 b^3 \tan ^{-1}\left (\frac{b-a \tanh \left (\frac{1}{2} (c+d x)\right )}{\sqrt{-a^2-b^2}}\right )}{a d \left (-a^2-b^2\right )^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.001, size = 136, normalized size = 1.2 \begin{align*}{\frac{1}{da}\ln \left ( \tanh \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) }-2\,{\frac{{b}^{3}}{da \left ({a}^{2}+{b}^{2} \right ) ^{3/2}}{\it Artanh} \left ( 1/2\,{\frac{2\,a\tanh \left ( 1/2\,dx+c/2 \right ) -2\,b}{\sqrt{{a}^{2}+{b}^{2}}}} \right ) }-2\,{\frac{\tanh \left ( 1/2\,dx+c/2 \right ) b}{d \left ({a}^{2}+{b}^{2} \right ) \left ( \left ( \tanh \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}+1 \right ) }}+2\,{\frac{a}{d \left ({a}^{2}+{b}^{2} \right ) \left ( \left ( \tanh \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}+1 \right ) }} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 3.11662, size = 1455, normalized size = 12.88 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.21899, size = 209, normalized size = 1.85 \begin{align*} -\frac{b^{3} \log \left (\frac{{\left | 2 \, b e^{\left (d x + c\right )} + 2 \, a - 2 \, \sqrt{a^{2} + b^{2}} \right |}}{{\left | 2 \, b e^{\left (d x + c\right )} + 2 \, a + 2 \, \sqrt{a^{2} + b^{2}} \right |}}\right )}{{\left (a^{3} d + a b^{2} d\right )} \sqrt{a^{2} + b^{2}}} + \frac{2 \,{\left (a e^{\left (d x + c\right )} + b\right )}}{{\left (a^{2} d + b^{2} d\right )}{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}} - \frac{\log \left (e^{\left (d x + c\right )} + 1\right )}{a d} + \frac{\log \left ({\left | e^{\left (d x + c\right )} - 1 \right |}\right )}{a d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]